@extends('wap.layouts.master')
@section('title','登录')

@section('content')

<div class="aw-main aw-common-user">
	<div class="aw-bg-1 aw-assest-user-top-img">
		<div class="aw-user-top-bg">
			<img src="/wap/img/bg_1.png">
			<img class="aw-user-top-login-gai" src="/wap/img/bg_logo.png">
		</div>
		<div class="aw-user-top-poa aw-user-top-logo"><img src="/wap/img/logo.png"></div>
	</div>
	<!--表单-开始-->
	<ul class="aw-assest-form aw-bg-fff aw-mt30">
		<li class="aw-form-li">
			<div class="aw-left">手机号</div>
			<div class="aw-conter">
				<input type="text" placeholder="请输入手机号" class="aw-text-left" id="phone" name="phone" v-model="form.phone" :value="form.phone">
			</div>
		</li>
		<li class="aw-form-li">
			<div class="aw-left">密码</div>
			<div class="aw-conter">
				<input type="password" placeholder="请输入密码" class="aw-text-left" id="pwd" name="pwd" v-model="form.pwd" :value="form.pwd">
			</div>
		</li>
		<li class="aw-form-li aw-pr130 aw-hide">
			<div class="aw-left">验证码</div>
			<div class="aw-conter">
				<input type="text" placeholder="请输入手机验证码" class="aw-text-left" id="code" name="code" v-model="form.code" :value="form.code">
			</div>
			<div class="aw-right aw-right-code">
				<input onclick="Send_Code(this,'#Vue-body')" type="button" value="获取验证码" class="aw-assest-btn aw-btn-radius aw-btn-bgcolor-lanse aw-padding0">
			</div>
		</li>
	</ul>
	<div class="aw-common-login-a aw-text-right"><a href="/wap/common/pwd">忘记密码？</a></div>
	<div class="aw-common-btn aw-mt20"><a v-on:click="Click_Login()" href="javascript:;" class="aw-assest-btn aw-btn-radius aw-btn-bgcolor-lvse">登录</a></div>
	<div class="aw-common-login-a aw-text-center aw-mt10"><a href="/wap/common/reg">没有账号,<span class="aw-color-1">去注册</span>></a></div>
	<!--表单-结束-->
</div>

@section('pagejs')
@parent
<script type="text/javascript">
var AD_login={
	api:'/api/user/login',
	form_data:{phone:'',pwd:''},
	tips:'登陆成功',
}
vm=new Vue({
	el:'#Vue-body',
	data:{
		form:AD_login.form_data
	},methods:{
		Click_Login:function(){
			console.log(this.data)
			Form_Verification('#Vue-body',this.form,'pwd',function(ver_code){
				if(ver_code==1){
					postData(AD_login,function(ajax_data){
						id=ajax_data.uid;
						//获取用户详情存进缓存
						Get_User_Info(id,'/wap/user/index')
					})
				}
			})
		}
	}
})
</script>
@endsection

@endsection

